Repository navigation
feat(atlas-core): record embedding_model in atlas_manifest, refuse mixed-model fan-out (#7646) - #8326
Conversation
…xed-model fan-out (#7646)
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 27 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 623f0b0b4c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| match &m.embedding_model { | ||
| None => { | ||
| return Err(Error::fatal(format!( | ||
| "shard {}: atlas_manifest has no `embedding_model` key; this consumer embeds with `{expected_embedding_model}` and a shard of unknown embedding provenance must not be scanned", |
There was a problem hiding this comment.
Stamp the CLI shard fixtures with the required model identity
The CLI parity fixture producer, build_shard_dir in pkgs/atlas-search/crates/atlas-search/tests/cli_parity.rs:430–436, still writes manifests without embedding_model. Consequently, this new mandatory check aborts discovery in both cli_shard_fanout_matches_python_vector_results and cli_shard_fanout_default_never_touches_secret_shard, which assert successful CLI execution. These tests are included in the atlas-search test step in .github/workflows/atlas-search-pr.yml. Update that fixture producer alongside the atlas-core fixtures so the existing CLI tests remain compatible with the new manifest contract.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
Fixed before merge — thanks. Commit 81946d882 ("test(atlas-search): stamp embedding_model in cli_parity shard fixtures (#7646 backfill)") stamps ("embedding_model", "snowflake-arctic-embed-m-v2.0") in build_shard_dir, mirroring the atlas-core fixture backfill. Verified on the laptop after that commit: cargo test -p atlas-search — 31 lib + 11 cli_parity tests, 0 failures, including both cli_shard_fanout_matches_python_vector_results and cli_shard_fanout_default_never_touches_secret_shard (they failed exactly as you describe before the stamp, which also end-to-end proved the new refusal fires through the real CLI). PR merged as a9a3748eeb.
…n shards tests (pre-existing on main)
|
Salvage note (lane any-b, task 17236): duplicate PR #8283 diffed against this canonical PR — nothing unique Per the duplicate-PR protocol, PR #8283 (the earlier branch queue/13749-7646-atlas-embedding-model, head 45a8aab) was compared piece by piece against what landed here (623f0b0, merged 2026-11-10T22:38:37Z) and its follow-ons:
Verdict: nothing unique in #8283 — it is a strict subset of the landed implementation. It is being closed as superseded, with the evidence recorded on #8283. Issue #7646 was already closed COMPLETED by this PR. |
Implements contract points M1/M2 of the #6060 decision record for #7646 (triage: task 13749, lane code-y — gap verified live on main:
embedding_modelappeared nowhere inpkgs/atlas-search).atlas_manifestgains anembedding_modelkey:Manifestcarries it (Option<String>— an absent key parses asNoneso the refusal can name the shard), andEMBEDDING_MODEL_ID(snowflake-arctic-embed-m-v2.0, the mandated model via atlas-embed) is the recorded identity.probe, beside the existing cosine check, same fatal posture): a shard with a missingembedding_modelkey or one that differs from the consumer's expected identity (DiscoveryOptions.embedding_model, defaulting to the mandated id) is refused with an error naming the shard and both model identities. In lenient discovery this records as aRejection, as with the other integrity failures.ShardInfocarries the validated identity;fanout_scanadditionally refuses a scanned set that mixes identities — failing loud before any shard is scanned or merged (M1).merge_top_kis unchanged (M3).Tests (oracle: the issue's acceptance): manifest round-trip carries the key; discovery refuses a missing key and a mismatched key with both ids named; uniform-model fan-out is covered by the existing oracle/discovery tests. Full atlas-core suite run on the laptop before merge.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.